<html lang="zh-CN" ng-app="app">
	<head>
		<meta charset="utf-8"/>
		<title>lyric</title>
		<meta name="wap-font-scale" content="no">
    	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<script src="js/update.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/angular.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/angular-touch.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/controller/controller.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" charset="utf-8">
//取消浏览器的所有事件，使得active的样式在手机上正常生效
document.addEventListener('touchstart',function(){
    return false;
},true);
// 禁止选择
document.oncontextmenu=function(){
	return false;
};
// H5 plus事件处理
var as='pop-in';// 默认窗口动画
function plusReady(){
	// 隐藏滚动条
	plus.webview.currentWebview().setStyle({scrollIndicator:'none'});
	// Android处理返回键
	plus.key.addEventListener('backbutton',function(){
		if(confirm('确认退出？')){
			plus.runtime.quit();
		}
	},false);
	compatibleAdjust();
}
if(window.plus){
	plusReady();
}else{
	document.addEventListener('plusready',plusReady,false);
}
// DOMContentLoaded事件处理
var _domReady=false;
document.addEventListener('DOMContentLoaded',function(){
	_domReady=true;
	compatibleAdjust();
},false);
// 兼容性样式调整
var _adjust=false;
function compatibleAdjust(){
	if(_adjust||!window.plus||!_domReady){
		return;
	}
	_adjust=true;
	// iOS平台使用div的滚动条
	if('iOS'==plus.os.name){
		document.getElementById('content').className='scontent';
	}
	// 预创建二级窗口
//	preateWebviews();
	// 关闭启动界面
	setTimeout(function(){
		plus.navigator.closeSplashscreen();
	},500);
}
// 处理点击事件
var _openw=null;
function clicked(id,a,s){
	if(_openw){return;}
	a||(a=as);
	_openw=preate[id];
	if(_openw){
		_openw.showded=true;
		_openw.show(a,null,function(){
			_openw=null;//避免快速点击打开多个页面
		});
	}else{
//		var wa=plus.nativeUI.showWaiting();
		_openw=plus.webview.create(id,id,{scrollIndicator:'none',scalable:false,popGesture:'hide'},{preate:true});
		preate[id]=_openw;
		_openw.addEventListener('loaded',function(){//叶面加载完成后才显示
//		setTimeout(function(){//延后显示可避免低端机上动画时白屏
//			wa.close();
			_openw.showded=true;
			s||_openw.show(a,null,function(){
				_openw=null;//避免快速点击打开多个页面
			});
			s&&(_openw=null);//避免s模式下变量无法重置
//		},10);
		},false);
		_openw.addEventListener('close',function(){//页面关闭后可再次打开
			_openw=null;
			preate[id]&&(preate[id]=null);//兼容窗口的关闭
		},false);
	}
}
</script>
	</head>
	<body ng-controller="index" ng-swipe-right="layershow=false" ng-swipe-left="layershow=true">
		<div class="lyric">
			<div class="title">
				<h1>{{title | limitTo:18}}</h1>
				<span>海子</span>
			</div>
			<div class="content" id="con">
				<p ng-repeat="p in content track by $index">{{p}}</p>
			</div>
			<div class="content-layer"></div>
		</div>
		<div class="footer">
			<ul>
				<li ng-click="layershow=!layershow"><i class="iconfont {{layershow?'active':''}}">&#xe603;</i></li>
				<li ng-click="likethis()"><i class="iconfont {{like?'active':''}}">&#xe602;</i></li>
				<li ng-click="nextthis()"><i class="iconfont {{nexticon?'active':''}}">&#xe601;</i></li>
			</ul>
			</div>
			<div class="layer {{layershow?'active':''}}">
				<ul>
					<li><img ng-click="likeGroup()" ng-src="{{likeToggle?'img/writer.png':'img/writer2.png'}}" alt="" /></li>
					<li><img ng-click="alert()" src="img/twitter.png" alt="" /></li>
					<li><img ng-click="alert()" src="img/layer-img3.png" alt="" /></li>
					<li><img ng-click="alert()" src="img/layer-img4.png" alt="" /></li>
				</ul>
			</div>
	</body>
</html>
